<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('platforms', function (Blueprint $table) {
            $table->id();
            $table->string('name')->unique()->comment('平台名称');
            $table->string('code')->unique()->comment('平台代码');
            $table->string('logo')->nullable()->comment('平台logo');
            $table->text('description')->nullable()->comment('平台描述');
            $table->boolean('is_active')->default(true)->comment('是否启用');
            $table->json('settings')->nullable()->comment('平台配置');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('platforms');
    }
}; 